import {BaseAddDTO, BaseDetailsDTO, BaseListDTO, BasePageQuery, BaseUpdateDTO} from '@/types/baseInterface'
import {TemplateTreeDTO} from "@/api/template/models";

/**
 * 构建记录添加
 */
export interface BuildRecordAddDTO extends BaseAddDTO {
    dataSourceName: string,
    templateName: string,
    dataSourceId: string,
    templateId: string,
    buildConfig: string
}

/**
 * 构建记录修改
 */
export interface BuildRecordUpdateDTO extends BaseUpdateDTO {
    dataSourceName: string,
    templateName: string,
    dataSourceId: string,
    templateId: string,
    buildConfig: string
}


/**
 * 构建记录详情
 */
export interface BuildRecordDetailsDTO extends BaseDetailsDTO {
    dataSourceName: string,
    templateName: string,
    dataSourceId: string,
    templateId: string,
    buildConfig: string
}

/**
 * 构建记录列表
 */
export interface BuildRecordListDTO extends BaseListDTO {
    dataSourceName: string,
    templateName: string,
    dataSourceId: string,
    templateId: string,
    buildConfig: string
}

export interface BuildRecordQuery extends BasePageQuery {

}

export interface BuildReq {
    dataSource: BuildDataSourceDTO,
    template: TemplateTreeDTO,
}

export interface BuildDataSourceDTO {
    id: string,
    dataObj: object,
}

export interface FileData {
    id: string,
    name: string,
    fileContent: string,
    children?: FileData[],
}